<%@ page contentType="text/html; charset=UTF-8"  pageEncoding="UTF-8" errorPage="/error.jsp"%>
<%@page import="dbexp.connection.DbMetaData"%>
<%@page import="dbexp.connection.DbConnection"%>
<%@page import="dbexp.model.db.DbUser"%>
<%@page import="java.sql.DatabaseMetaData"%>
<%@page import="dbexp.connection.PoolManager"%>
<%
DbUser u = (DbUser)session.getAttribute("USER");
if(u!=null){
DatabaseMetaData dbmd = DbConnection.getIFor(u).getConnection().getMetaData();
%>

<div id="welcome">
    <div class="col-last">
        <div class="res-block">
            <div class="res-block-inner">
                <h3><%=dbmd.getDatabaseProductName()+" "+dbmd.getDatabaseMajorVersion()+"."+dbmd.getDatabaseMinorVersion()%></h3>
                <ul id="legend" style="list-style:none;margin-left:0;">
                	 <li><b>Host:</b>  <%=u.getHostName() %></li>
                  	<li><b>Port:</b>  <%=u.getPortNumber() %></li>
		            <li><b>SID:</b> <%=u.getDbName() %> </li>
		            <li><b>Użytkownik:</b>   <%=u.getSchemaName() %></li>
		            <li><b>Status:</b>   <%=u.getStatus() %></li>
		            <li><b>Utworzony:</b>   <%=u.getCreated() %></li>
		            <li><b>DBA:</b>   <%=u.isAccessToDBA() %></li>
		        </ul>
            </div>
        </div>
    </div>
</div>
<%}%>